package com.sudo.api._res;

import com.sudo.api._admin.AdminBaseController;
import com.sudo.common.utils.JsonRes;
import com.sudo.common.utils.PagedGridResult;
import com.sudo.dao.res.model.bo.ResSegmentDataBo;
import com.sudo.service.res.service.ResSegmentDataService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Api(value = "号段接口",tags = {"号段相关的接口"})
@RestController
@RequestMapping("resSegmentData")
public class ResSegmentDataController extends AdminBaseController {

    @Resource
    private ResSegmentDataService resSegmentDataService;

    @ApiOperation(value = "分页查询号段",notes = "分页查询号段",httpMethod = "POST")
    @PostMapping("/queryResSegmentDataByPage")
    public JsonRes queryResSegmentDataByPage(@RequestBody ResSegmentDataBo resSegmentDataBo) {
        PagedGridResult pagedGridResult = resSegmentDataService.queryResSegmentDataByPage(resSegmentDataBo);
        return JsonRes.ok(pagedGridResult);
    }

}
